import { createRouter, createWebHistory } from 'vue-router'
import index from '../views/index.vue'
import box1 from '../views/hot-pro-box/box1.vue'
import box2 from '../views/hot-pro-box/box2.vue'
import box3 from '../views/hot-pro-box/box3.vue'
import box4 from '../views/hot-pro-box/box4.vue'
import box5 from '../views/hot-pro-box/box5.vue'
import profession from '../views/profession.vue'
import company from '../views/company.vue'
import appPage from '../views/appPage.vue'
import companyDetail from '../views/companyDetail.vue'
import companyIntro from '../views/cdetail/company-intro.vue'
import recruiting from '../views/cdetail/recruiting.vue'
import cempty from '../views/company/cempty.vue'
import companyList from '../views/company/companyList.vue'
import pempty from '../views/profession/pempty.vue'
import professionList from '../views/profession/professionList.vue'
import wrong from '../views/wrong.vue'
import jobDetail from '../views/jobDetail.vue'

const routes = [
  {
    path:'/',
    name:'index',
    component:index,
    children:[
      {
        path:'/',
        name:'box1',
        component:box1
      },
      {
        path:'/box2',
        name:'box2',
        component:box2
      },
      {
        path:'/box3',
        name:'box3',
        component:box3
      },
      {
        path:'/box4',
        name:'box4',
        component:box4
      },
      {
        path:'/box5',
        name:'box5',
        component:box5
      }
    ]
  },
  {
    path:'/jobDetail',
    name:'jobDetail',
    component:jobDetail,
  },
  {
    path:'/index/wrong',
    name:'wrong',
    component:wrong,
  },
  {
    path:'/profession',
    name:'profession',
    component:profession
  },
  {
    path:'/pempty',
    name:'pempty',
    component:pempty
  },
  {
    path:'/professionList',
    name:'professionList',
    component:professionList
  },
  {
    path:'/company',
    name:'company',
    component:company
  },
  {
    path:'/cempty',
    name:'cempty',
    component:cempty
  },
  {
    path:'/appPage',
    name:'appPage',
    component:appPage,
  },
  {
    path:'/companyList',
    name:'companyList',
    component:companyList
  },
  {
    path:'/companyDetail',
    name:'companyDetail',
    component:companyDetail,
    children:[
      {
        path:'/companyIntro',
        name:'companyIntro',
        component:companyIntro,
      },
      {
        path:'/recruiting',
        name:'recruiting',
        component:recruiting,
      }
    ],
    redirect: '/companyIntro'
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
